package com.jhws.business.appconfig.bo;


import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * APP自定义配置类型表，用于自定义配置信息如所有的WEB服务器地址
 */
@Table(name = "app_config_type")
@Entity
public class AppConfigType {
    @Id
    @Column(name = "id")
    private String id; //主键
    @Column(name = "parent_id")
    private String parentId; //父ID
    @Column(name = "type_name")
    private String typeName; //类型名称
    @Column(name = "type_key")
    private String typeKey; //类型key
    @Column(name = "type_value")
    private String typeValue; //类型对应值
    @Column(name = "device_type")
    private String deviceType; //设备类型 门口机：oudoor 室内机：indoor 手机：mobile
    @Column(name = "update_time")
    private Date updateTime; //更新时间
    @Column(name = "description")
    private String description;// 描述
    @Transient
    private List<AppConfigType> children;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getTypeKey() {
        return typeKey;
    }

    public void setTypeKey(String typeKey) {
        this.typeKey = typeKey;
    }

    public String getTypeValue() {
        return typeValue;
    }

    public void setTypeValue(String typeValue) {
        this.typeValue = typeValue;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<AppConfigType> getChildren() {
        return children;
    }

    public void setChildren(List<AppConfigType> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "AppConfigType{" +
                "id='" + id + '\'' +
                ", parentId='" + parentId + '\'' +
                ", typeName='" + typeName + '\'' +
                ", typeKey='" + typeKey + '\'' +
                ", typeValue='" + typeValue + '\'' +
                ", deviceType='" + deviceType + '\'' +
                ", updateTime=" + updateTime +
                ", description='" + description + '\'' +
                ", children=" + children +
                '}';
    }
}
